package com.pan.script.pantrans.sentence.impl;

import com.pan.script.pantrans.action.Action;
import com.pan.script.pantrans.sentence.Sentence;

import java.awt.*;

public class ArgSentence<T> implements Sentence {

    Action action;
    T arguments;


    public ArgSentence(Action action, T arguments) {
        this.action = action;
        this.arguments = arguments;
    }

    public Action getFunc() {
        return action;
    }

    public T getArguments() {
        return arguments;
    }

    @Override
    public void execute(Robot robot) {
        action.run(robot, arguments);
    }
}

